<template>
  <up-overlay :show="show" @click="closeOverlay">
    <div class="overlay-content" @click.stop="changeShow">
      12123123
    </div>
  </up-overlay>
</template>

<script setup>
import UpOverlay from '../up-overlay/index.vue'
import { defineEmits, defineProps } from 'vue'

const props = defineProps({
  show: {
    type: Boolean,
    default: false
  },
  isClick: {
    type: Boolean,
    default: false
  }
})
const emit = defineEmits(['update:show'])
const changeShow = () => {
  emit('update:show', false)
}
const closeOverlay = () => {
  if (!props.isClick) return
  emit('update:show', false)
}

</script>

<style lang="less">
.overlay-content {
  width: 200px;
  height: 200px;
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
}
</style>
